import React, { memo,Suspense } from 'react'
import {HashRouter  } from "react-router-dom";
import { renderRoutes } from "react-router-config";
import { Provider } from 'react-redux';
import routes from "./router";
import store from './store'

import HJAppHeader from "@/components/app-header";
import HJAppFooter from "@/components/app-footer";
import HjAppPlayBar from "./pages/play/app-play-bar";

export default memo(function App() {

  return (
    <Provider store={store}>
      <HashRouter>
        <HJAppHeader/>
         <Suspense fallback="<div>loading</div>">
          {renderRoutes(routes)}
          </Suspense>
        <HJAppFooter/>
        <HjAppPlayBar/>
      </HashRouter>
    
   </Provider>
  )
})  
